//
// Created by tacom on 22-9-3.
//
/**
 * 这个是个cuda内核调用测试类，
 *  1. 测试 global -> global , error: global kernel需要在host中调用
 *  2. 测试 global -> device, success
 *  3. 测试 global -> other_file/device, success (直接把文件加入编译)
 *  4. 测试 global -> static link/device, error: undefined reference
 */

#include "cuda_runtime.h"
//#include "cstdio"
#include "CudaWithKernelPart2.cuh"
#include "KernelStatic.cuh"

__device__ void printId(){
//    printf("Hello from block %d \n", blockIdx.x);
}

__global__ void DynPara(){
    dim3 grid(2, 1, 1);
    dim3 block(1, 1, 1);
    printId();
    print2();
    printStatic();
//    printf("aaa Hello from block %d \n", blockIdx.x);
}

int main(){
    dim3 grid(1, 1, 1);
    dim3 block(1, 1, 1);

    DynPara<<<grid, block>>>();
    cudaDeviceSynchronize();
}